import request from '@/utils/request'

// 查询看样记录列表
export function listViewing(query) {
  return request({
    url: '/wms/viewing/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/wms/viewing/initBean',
        method: 'post'
    })
}

// 查询看样记录详细
export function getViewing(id) {
  return request({
    url: '/wms/viewing/' + id,
    method: 'get'
  })
}

// 新增看样记录
export function addViewing(data) {
  return request({
    url: '/wms/viewing',
    method: 'post',
    data: data
  })
}

// 修改看样记录
export function updateViewing(data) {
  return request({
    url: '/wms/viewing',
    method: 'put',
    data: data
  })
}

// 修改看样记录
export function chekcViewing(data) {
  return request({
    url: '/wms/viewing/check',
    method: 'post',
    data: data
  })
}

// 删除看样记录
export function delViewing(id) {
  return request({
    url: '/wms/viewing/' + id,
    method: 'delete'
  })
}
